<!DOCTYPE html>
<html lang="cn">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Mini Vue</title>
</head>
<body>
  <div id="app">
    <h1>v-html</h1>
    <div v-html="htmlContent"></div>
    <button v-on:click="handleClick">改变 v-html 内容</button>
  </div>
  <script src="./js/dep.js"></script>
  <script src="./js/watcher.js"></script>
  <script src="./js/compiler.js"></script>
  <script src="./js/observer.js"></script>
  <script src="./js/vue.js"></script>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        htmlContent: '<span>我是 v-html 内容</span>'
      },
      methods: {
        handleClick () {
          console.log('handleClick 触发')
          console.log(this)
          this.htmlContent = '<span>我是新的 v-html 内容</span>'
        }
      }
    })
  </script>
</body>
</html>